<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
  <title>Home Page</title>
  <link rel="stylesheet" href="<?=base_url() ?>assets/css/jquery.mobile-1.3.1.min.css" />
    <link rel="stylesheet" href="<?=base_url() ?>assets/css/pcs.css">
  <script src="<?=base_url() ?>assets/js/jquery-1.9.1.min.js"></script>
  <script src="<?=base_url() ?>assets/js/jquery.mobile-1.3.1.min.js"></script>
  			   
</head>
<body>
<!-- Home -->

<div data-role="page" id="home" class="pcs-demos" style ="background: transparent;">
    <div data-theme="d" data-role="header" data-position="fixed" class="pcs-header">
            <a data-role="button" href="#detailspanel" data-icon="bars" data-iconpos="left" class="ui-btn-right">
            Details
        </a>
        <a id="homebtn" data-role="button" data-direction="reverse" href="#home"
        data-icon="home" data-iconpos="left" class="ui-btn-left">
            Home
        </a>
		
        <h5 id="headertxt" class="header">
            mPCS
        </h5>
    </div>
    <div data-role="content">
		<div class="content-primary">
			<h3><?php echo $user; ?></h3>
			<center>
			<h2>
				PCS List
			</h2>
			
			<?php foreach ($pcs as $row) :?>
			<div data-role="collapsible-set" data-theme="c" data-content-theme="d" data-mini="true">
				
				<div data-role="collapsible">
					<h3><?php echo $row->id_pcs; ?></h3>
					<p>
					<table data-role="table" id="summary-table" data-mode="reflow" class="table-stripe ui-responsive" style="width:100%;">
						<thead>
							<tr class="ui-bar-d">
								<th>ID</th>
								<th>Customer</th>
								<th>Project Name</th>
								<th>Category</th>
								<th>PCS Status</th>
								<th>Approval Status</th>
							</tr>
						</thead>
						<tbody> 
							<tr>
								<td><?php echo $row->id_pcs; ?></td>
								<td><?php echo $row->customer; ?></td>
								<td><?php echo $row->project_name; ?></td>
								<td><?php echo $row->category; ?></td>
								<td><?php echo $row->pcs_status; ?></td>
								<td><?php echo $row->approval_status; ?></td>
							</tr>   
						</tbody>
					</table>							
					</p>
				</div>
			</div>
			<?php endforeach?>
			
			
		 </center>
		</div>
		<div class="content">
			<div data-role="collapsible" data-mini="true">
					<h2>Profits</h2>
					<ul data-role="listview" data-theme="b" data-divider-theme="d">
						<li data-role="list-divider"><strong>Total Gross Profit (USD $)</strong><span class="ui-li-count"><strong>520,33700.000,00</strong></span></li>
						<li><a href="detail_spec?id=">
							<h3>Own Service</h3>
							<table>
							<tr><td><p><strong>Total COGS</strong></p></td><td><p>:</p></td><td><p>0,00</p></td></tr>
							<tr><td><p><strong>Total Sales</strong></p></td><td><p>:</p></td><td><p>100.000,00</p></td></tr>
							<tr><td><p><strong>Gross Profit</strong></p></td><td><p>:</p></td><td><p>100.000,00</p></td></tr>
							<tr><td><p><strong>Gross Profit (%)</strong></p></td><td><p>:</p></td><td><p>100%</p></td></tr>
							</table>
							
						</a></li>
						<li><a href="detailspec">
							<h3>Hardware</h3>
							<table>
							<tr><td><p><strong>Total COGS</strong></p></td><td><p>:</p></td><td><p>300.000,00</p></td></tr>
							<tr><td><p><strong>Total Sales</strong></p></td><td><p>:</p></td><td><p>600.000,00</p></td></tr>
							<tr><td><p><strong>Gross Profit</strong></p></td><td><p>:</p></td><td><p>300.000,00</p></td></tr>
							<tr><td><p><strong>Gross Profit (%)</strong></p></td><td><p>:</p></td><td><p>50%</p></td></tr>
							</table>
							
						</a></li>
						<li><a href="detailspec.html">
							<h3>Software</h3>
							<table>
							<tr><td><p><strong>Total COGS</strong></p></td><td><p>:</p></td><td><p>1.000.000,00</p></td></tr>
							<tr><td><p><strong>Total Sales</strong></p></td><td><p>:</p></td><td><p>1.300.000,00</p></td></tr>
							<tr><td><p><strong>Gross Profit</strong></p></td><td><p>:</p></td><td><p>300.000,00</p></td></tr>
							<tr><td><p><strong>Gross Profit (%)</strong></p></td><td><p>:</p></td><td><p>23,08%</p></td></tr>
							</table>
							
						</a></li>
					</ul>
				</div>
				
				
				
				</div>	
    </div>
			
	<!-- details panel  -->
	<div data-role="panel" id="detailspanel" data-position="right" data-display="overlay" data-theme="b">
        <i>click off the panel to close</i>
		<h3>Details Panel</h3>
		<hr >
		<ul data-role="listview">
			<li><a href="http://localhost/mpcs/project_desc">Project Description</a></li>
			<li><a href="#">Detail Spec. of Prod.</a></li>
			<li><a href="#">OPEX Sales</a></li>
			<li><a href="#">Training</a></li>
			<li><a href="#">Project Document</a></li>
			<li><a href="#">Risk Assesment</a></li>
			<li><a href="#">GA Expense</a></li>
			<li><a href="#">Cost of Fund</a></li>
			<li><a href="#">Profit Allocation</a></li>
			<li><a href="#">Approval Tracking</a></li>
		</ul>
	</div><!-- /details panel -->
	
    <div data-theme="d" data-role="footer" data-position="fixed" class="pcs-header"> 
	<!--a id="logoutbtn" data-role="button" data-direction="reverse" href="#home"
        data-icon="arrow-l" data-iconpos="left">Logout</a-->
        <h3>
		@2013 Anabatic Technologies - <i> Always Think Better Ways </i>
        </h3>
    </div>
</div>
</body>
</html>
